package com.example.basic.service;

import com.example.basic.domain.User;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author mjw
 * @date 2022/8/25
 */
public interface UserService {

    User findByNameAndAge(String name, Integer age);

    PageInfo<User> selectAll(int pageNum, int pageSize);

    User selectById(Integer id);

    Integer addUser(User user);

    Integer addBatch(List<User> userList);

    Integer update(User user);

    Integer deleteById(Integer id);

    Integer deleteBatch(List<Integer> idList);

    List<User> selectBySex(String sex);

    List<User> findByIds(List<Integer> ids);

    List<User> findByNames(List<String> names);

    String batchImport(MultipartFile file);

    void addCycle();

    List<User> selectByThread();

    List<User> selectNoThread();

    List<User> selectByPartition();

    void generatePdfDoc(HttpServletResponse response)  throws Exception;
}
